import request from '@/utils/request'
/**@description 查询所有的单词表 */
export function listTable(query) {
  return request({
    url: '/system/table/getTable',
    method: 'get',
    params: query
  })
}

/**@description 查询表格详细 */
export function getTable(name) {
  return request({
    url: `/system/table/find?name=${name}`,
    method: 'get'
  })
}

/**@description 更新front_account */
export function updateTable(old, newone) {
  return request({
    url: '/system/table/updateTable',
    method: 'post',
    data: {
      old: old,
      newone: newone
    }
  })
}
/**@description 新增front_account */
export function addTable(name) {
  return request({
    url: '/system/table/addTable',
    method: 'post',
    data: {
      name: name
    }
  })
}

/**@description 删除front_account */
export function delTable(name) {
  return request({
    url: '/system/table/delTable',
    method: 'post',
    data:{
      name:name
    }
  })
}